home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / TC Prog Guide.cpt / picture ƒ / camera.h < prev    next >
Text File  |  1990-11-08  |  1KB  |  42 lines

  1. /*
  2. *    FILE:        camera.h
  3. *    AUTHOR:        R. Gonzalez
  4. *    CREATED:    October 2, 1990
  5. *
  6. *    Defines camera (parameters for 3D projection) for the picture
  7. *    application.
  8. */
  9.  
  10. # ifndef    camera_h
  11. # define    camera_h
  12.  
  13. # include    "class.h"
  14. # include    "coord.h"
  15. # include    "trans.h"
  16.  
  17. /******************************************************************
  18. *   camera class.  The camera's location is given in world
  19. *    coordinates.  If you were to translate the camera to the
  20. *    origin of the world coordinate system, then (1) yaw is the angle
  21. *    the camera is pointing as rotated about the world's vertical
  22. *    (y) axis (with respect to the direction of the world z axis);
  23. *    (2) pitch is the angle it is pointing with respect to the world
  24. *    horizontal (x-z) plane; (3) roll is the angle the camera's "up"
  25. *    direction makes from the world's y axis, as measured about the
  26. *    axis in which the camera is pointing.  Note that yaw and roll
  27. *    are undefined when pitch is PI/2 or -PI/2; i.e., when the
  28. *    camera points straight up or down.
  29. ******************************************************************/
  30. struct    Camera:Generic_Class
  31. {
  32.     World_To_Camera    *world_to_camera;
  33.     double            focal_length;
  34.     
  35.     boolean            init(void);
  36.     virtual void    set_position(double,double,double,double,double,double);
  37.     virtual void    set_focal_length(double);
  38.     virtual boolean    take_photo(Coord2*,Coord3*);
  39.     boolean            destroy(void);
  40. };
  41.  
  42. # endif